modifier_strategy_improve = class({})
require('abilities/modifiers/common_modifiers')
function modifier_strategy_improve:OnCreated()
	self.extra_roll_point = self:GetAbility():GetSpecialValueFor("extra_roll_point")
	self.spell_chance = self:GetAbility():GetSpecialValueFor("spell_chance")
	self.spell_gold_bonus = self:GetAbility():GetSpecialValueFor("spell_gold_bonus")
	self.reputation_bouns = self:GetAbility():GetSpecialValueFor("reputation_bouns")
	common_modifiers:RegisterCommonModifier(self,false)

	local playerid = self:GetAbility():GetCaster():GetPlayerOwnerID()
	resource.player_reputation[playerid] = resource.player_reputation[playerid] + self.reputation_bouns

end

function modifier_strategy_improve:DeclareFunctions()
	local funcs = {
		MODIFIER_EVENT_ON_ABILITY_EXECUTED
	}
	return funcs
end

function modifier_strategy_improve:OnAbilityExecuted( params )
	if IsServer() then
		if params.unit == self:GetParent() then
			local hAbility = params.ability
			if hAbility:IsItem() then
				PlayerResource:ModifyGold(self:GetAbility():GetCaster():GetPlayerOwnerID(), self.spell_gold_bonus, false, 0)
				if RandomInt(0, 100) <= self.spell_chance then
					--鼓舞效果(无)
				end
				--武将技拼点(无)
			end
		end
	end
end